// app.ts
App<IAppOption>({
  globalData: {},
  onLaunch() {
    // 展示本地存储能力
    const logs = wx.getStorageSync('logs') || []
    logs.unshift(Date.now())
    wx.setStorageSync('logs', logs)

    // 登录
    wx.login({
      success: res => {
        console.log(res.code)
        // 发送 res.code 到后台换取 openId, sessionKey, unionId
      },
    })
  },
  
  /*
  detectImage(access_token,media_url){
    wx.request({
      url: 'https://api.weixin.qq.com/wxa/media_check_async', //接口地址
      data: {
        access_token:access_token,
        media_url:media_url,
        media_type:2,
        version:2,
        scene:1,
      },
      header: {
        'content-type': 'application/json' // 默认值
      },
      method:"POST",
      success(res) {
            // 返回值
            console.log("返回值为",res.data)
            return res.data
      }
    })

  }*/
})